import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/views/Home'
import Section from '@/views/Section'
import Booking from '@/views/Booking'
import My from '@/views/My'
import Find from '@/views/Find'
import NotFound from '@/views/NotFound'
import Recommend from '@/views/second/Recommend'
import Ranking from '@/views/second/Ranking'
import Songlist from '@/views/second/Songlist'
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/Find'
  },
 
  {
    path:'/find',
    name:'Find',
    component:Find,
    redirect: '/find/recommend',
children:[
  {
    path:'recommend',
    component:Recommend,
  },
  {
    path:'ranking',
    component:Ranking,
  },
  {
path:'songlist',
component:Songlist,
  }
]
  },
  {
    path:'/home',
    name:'Home',
    component:Home,
  },
  {
  path:'/section',
  home:'Section',
  component:Section
  },
  {
    path:'/booking',
    name:'Booking',
    component:Booking
  },
  {
    path:'/my',
    name:'My',
    component:My
  },
  {
    path:'*',
    component:NotFound
  }
  
]


const router = new VueRouter({
  routes
})

export default router
